<?php
/**
 * 创建文章页面
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/1/18
 * Time: 10:43
 */

$this->title = '创建';
$this->params['breadcrumbs'][] = ['label'=>'文章','url'=>['post/index']];
$this->params['breadcrumbs'][] = $this->title;

?>

<div class="row">
    <div class="col-lg-9">
        <div class="panel-title box-title">
            <span>创建文章</span>
        </div>
        <div class="panel-body">
            <?php $form = \yii\bootstrap\ActiveForm::begin() ?>

            <?=$form->field($model,'title')->textinput(['maxlength'=>true])?>

            <?=$form->field($model,'cat_id')->dropDownList($cat) ?>

            <?= $form->field($model,'label_img')->widget('common\widgets\file_upload\FileUpload',[
                'config'=>[
                    //图片上传的一些配置，不写调用默认配置
                    // 'domain_url' => 'http://frontend.hyii.com',
                ]
            ]) ?>



            <?= $form->field($model, 'content')->widget('common\widgets\ueditor\Ueditor',[
                'options'=>[
//                    'initialFrameWidth' => 850,
                    'initialFrameHeight' => 400,
//                    'toolbars'=>[],//默认引用的内容
                ]
            ]) ?>

            <?=$form->field($model,'tags')->widget('common\widgets\tags\TagWidget') ?>

            <div class=""form-group">
                <?=\yii\bootstrap\Html::submitButton("发布",['class'=>'btn btn-success']) ?>
            </div>

            <?php \yii\bootstrap\ActiveForm::end()?>
        </div>
    </div>
    <div class="col-lg-3">
        <div class="panel-title box-title">
            <span>注意事项</span>
        </div>
        <div class="panel-body">
            <p>1,请在发表文章的结尾注明作，如有个人常用网络昵称也可以使用。</p>
            <p>2,如果需要转帖别人的帖子，并且不要直接复制粘贴帖子，应将所转文章按照 我们博客的格式改好后发布。并在结尾注明转帖地址</p>
        </div>
    </div>
</div>
